import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import body from '@/components/body'
import work from '@/components/work.vue'

Vue.use(Router)
// 配置模块路由
import configRouter from './routesModules/configRouter'
//界面模块路由
import interfaceRouter from './routesModules/interfaceRouter'
//辅助模块路由
import helpRouter from './routesModules/helpRouter'
//运营模块路由
import operateRouter from './routesModules/operateRouter'
//用户管理模块路由
import userManageRouter from './routesModules/userManageRouter'
//数据中心模块路由
import dataCenterRouter from './routesModules/dataCenterRouter'
//栏目模块路由
import channelRouter from './routesModules/channelRouter'
//内容模块路由
import contentMangeRouter from './routesModules/contentMangeRouter'
//调查问卷
import voteRouter from "./routesModules/voteRouter";
//资源管理
import resourceManageRouter from "./routesModules/resourceManageRouter";
//舆情管理
import sentimentManageRouter from "./routesModules/sentimentManageRouter";

/**
 * routes==默认路由节点
 */
export const routes = [{
  path: '/login',
  name: '登录',
  component: login,
  hidden: true
},
  {
    path: '/',
    name: '工作台',
    meta: {
      role: 'work'
    },
    component: body,
    iconCls: 'icon-iconfontdesktop',
    leaf: true, //只有一个节点
    redirect: '/work',
    children: [{
      path: '/work',
      component: work,
    }
    ]
  }
];
export const ansycRoutes = [
  userManageRouter,//用户管理模块
  resourceManageRouter,//资源管理模块
  sentimentManageRouter,//舆情管理模块
  dataCenterRouter,//数据中心路由模块
  voteRouter,//调查问卷管理路由模块
  contentMangeRouter,//内容模块
  channelRouter,//栏目模块
  operateRouter,//运营模块
  helpRouter,//辅助路由模块
  interfaceRouter,///界面路由模块
  configRouter,//配置路由模块
  {
    path: '*',
    name: '404',
    component: work,
    meta: {
      role: 'index'
    },
    hidden: true
  }
];
